import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundByteHandlerAdapter;
import io.netty.channel.nio.NioEventLoopGroup;


public class DiscardServer {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ServerBootstrap bootStrap = new ServerBootstrap();
		bootStrap.group(new NioEventLoopGroup(), new NioEventLoopGroup());
		
	}
}

class DiscardServerHandler extends ChannelInboundByteHandlerAdapter {

	@Override
	public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause)
			throws Exception {
		ctx.close();
	}

	@Override
	protected void inboundBufferUpdated(ChannelHandlerContext ctx, ByteBuf in)
			throws Exception {
		in.clear();
	}
	
}
